# 多线程
import _thread
import time
import redis

def print_time(threadName,delay):
	r = redis.Redis(host='172.16.40.70', port=6379, db=15)
	num = r.lpop("nums")
	print(num)
	# count = 0
	# while count < 5:
	# 	#time.sleep(dalay)
	# 	count += 1
	# 	print(threadName+":"+time.ctime(time.time()))


try:
	_thread.start_new_thread(print_time,("Thread:1",1))

except:
	print("Error: 无法启动线程")

while 1:
	pass